From 25a63390b97f5e654a197166fe9c7b891fcb35ee Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 24 Feb 2010 10:57:24 +0000 Subject: [PATCH] cpuidle: Small fix to urgent_count update logic. From: Ke Yu Signed-off-by: Keir Fraser --- xen/common/schedule.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/common/schedule.c b/xen/common/schedule.c index d02eb1f0af..fdb9e8d0d2 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -107,7 +107,8 @@ static inline void vcpu_urgent_count_update(struct vcpu *v) if ( unlikely(v->is_urgent) ) { - if ( !test_bit(v->vcpu_id, v->domain->poll_mask) ) + if ( !test_bit(_VPF_blocked, &v->pause_flags) || + !test_bit(v->vcpu_id, v->domain->poll_mask) ) { v->is_urgent = 0; atomic_dec(&per_cpu(schedule_data,v->processor).urgent_count); @@ -115,7 +116,8 @@ static inline void vcpu_urgent_count_update(struct vcpu *v) } else { - if ( unlikely(test_bit(v->vcpu_id, v->domain->poll_mask)) ) + if ( unlikely(test_bit(_VPF_blocked, &v->pause_flags) && + test_bit(v->vcpu_id, v->domain->poll_mask)) ) { v->is_urgent = 1; atomic_inc(&per_cpu(schedule_data,v->processor).urgent_count); -- 2.30.2